package com.jboltai.scheduler;

import com.jboltai.capability.aitext.AITextProcessor;
import com.jboltai.config.JBoltAIConfig;
import com.jboltai.event.EventRunMode;
import com.jboltai.event.EventState;
import com.jboltai.event.ai.aitext.AITextEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AITextEventScheduler extends Scheduler<AITextEvent> {
    private static final Logger LOGGER = LoggerFactory.getLogger(JBoltAIConfig.LOGGER_NAME);
    public AITextEventScheduler() {
        super("ai-text");
    }

    @Override
    void publish(AITextEvent event) {
        event.setState(EventState.WAITING);
        AITextProcessor.INSTANCE.process(event, EventRunMode.PUBLISH);
    }

    @Override
    void process() {

    }

    @Override
    void dispatch(AITextEvent event) {
        AITextProcessor.INSTANCE.process(event, EventRunMode.DISPATCH);
    }
}
